Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clamped capacity to be divided by element size #1549

Merged
merged 3 commits into from
Dec 28, 2022

Conversation

jkugelman
Copy link
Contributor

Fixes #1459 (comment): the capacity of a Vec<O> is measured in number of elements not number of bytes, so divide 64KiB by the element size. This will round towards 0, which is desirable.

@coveralls
Copy link

coveralls commented Sep 12, 2022

Coverage Status

Coverage increased (+0.007%) to 79.285% when pulling 64216b8 on jkugelman:clamp-capacity-wording into 3645656 on Geal:main.

- Fixes rust-bakery#1459 (comment)
- Also change `clamp` to `min` so this works on Rust 2018 edition.
src/multi/mod.rs Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Dec 28, 2022

Pull Request Test Coverage Report for Build 3796644783

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.009%) to 61.637%

Files with Coverage Reduction New Missed Lines %
src/character/complete.rs 1 81.02%
Totals Coverage Status
Change from base Build 3796631867: -0.009%
Covered Lines: 1499
Relevant Lines: 2432

💛 - Coveralls

@Geal Geal merged commit 400331e into rust-bakery:main Dec 28, 2022
@Geal
Copy link
Collaborator

Geal commented Dec 28, 2022

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a count-like combinator, without preallocation
3 participants